<#macro fieldToSqlType field>
<#switch field.@type>
<#case "string"><#if (field.@len?number>4000) >TEXT<#else>VARCHAR(${field.@len})</#if><#break>
<#case "timestamp">DATETIME<#break>
<#case "date">DATE<#break>
<#case "int">INT(6)<#break>
<#case "long">INT(11)<#break>
<#case "double"><#if (field.@len?if_exists?size>0)>DOUBLE(12,${field.@len})<#else>DOUBLE</#if><#break>
<#default>${field.@type}<#break>
</#switch>
</#macro>
